Skip to content

Switch back to type-safe action bindings#2318

Open
Vampire wants to merge 1 commit intomasterfrom
vampire/back-to-typesafe
Open

Switch back to type-safe action bindings#2318
Vampire wants to merge 1 commit intomasterfrom
vampire/back-to-typesafe

Conversation

@Vampire
Copy link
Member

@Vampire Vampire commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated CI workflows to use the newer typed Codecov and CodeQL action interfaces for consistent behavior.
    • Converted string-configured flags to proper boolean values to ensure correct fail-on-error handling.
    • Broadened CodeQL action version constraints to allow greater compatibility with newer releases.

Copy link
Member Author

Vampire commented Mar 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: afd717bb-753b-4bd8-85c9-3633e497d845

📥 Commits

Reviewing files that changed from the base of the PR and between 9fdf18b and b7b6d3f.

📒 Files selected for processing (3)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/codeql-analysis.main.kts
  • .github/workflows/release.main.kts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/codeql-analysis.main.kts

📝 Walkthrough

Walkthrough

The PR updates three GitHub Actions Kotlin workflows to use typed action classes instead of their _Untyped variants, adjusts Codecov step parameter typing (string → boolean), and relaxes CodeQL action dependency version ranges.

Changes

Cohort / File(s) Summary
Codecov Action Migration
\.github/workflows/branches-and-prs.main.kts, \.github/workflows/release.main.kts
Replaced CodecovAction_Untyped with CodecovAction; changed failCiIfError_Untyped = "true" (string) to failCiIfError = true (boolean). Review upload step argument names and types.
CodeQL Action Migration
\.github/workflows/codeql-analysis.main.kts
Replaced CodeqlActionInit_UntypedCodeqlActionInit and CodeqlActionAnalyze_UntypedCodeqlActionAnalyze; updated imports and broadened @file:DependsOn ranges from [v4.32.4,v5-alpha) to [v4,v5-alpha). Verify constructor signatures and dependency resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐇 I hopped into workflows, light and spry,
Swapped untyped strings for booleans—hi!
Codecov, CodeQL, neat and bright,
Builds now tiptoe through the night.
🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating from untyped action bindings to type-safe action bindings across three workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vampire/back-to-typesafe

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR reverts the _Untyped binding workaround introduced in #2299 (commit 2db4303) — where CodecovAction_Untyped and CodeqlAction*_Untyped were used due to a github-workflows-kt API breaking change — and restores the original type-safe action bindings now that the library issue has been resolved.

Key changes:

  • branches-and-prs.main.kts & release.main.kts: Replace CodecovAction_Untyped(failCiIfError_Untyped = "true") with the properly-typed CodecovAction(failCiIfError = true) — a Boolean instead of a String.
  • codeql-analysis.main.kts: Replace CodeqlActionInit_Untyped and CodeqlActionAnalyze_Untyped with their typed counterparts, and relax the binding version range from [v4.32.4,v5-alpha) back to [v4,v5-alpha) to reflect that typed bindings are now available for the full v4 release line.
  • The generated .yaml files are unchanged — both typed and untyped bindings for these actions produce identical YAML output, which is also confirmed by the existing check_yaml_consistency CI job that would catch any divergence.

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure API-surface refactoring with no functional or generated-output changes.
  • All three changes are mechanical substitutions of _Untyped binding classes with their typed equivalents. The generated YAML files are unaffected (confirmed by the empty diff against the .yaml files), and the existing check_yaml_consistency CI job would catch any divergence. The version-range widening in codeql-analysis.main.kts is intentional and expected — typed bindings are now available for the full v4 range, not just v4.32.4+.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/branches-and-prs.main.kts Replaces CodecovAction_Untyped(failCiIfError_Untyped = "true") with the type-safe CodecovAction(failCiIfError = true); no logic or generated YAML changes.
.github/workflows/codeql-analysis.main.kts Replaces CodeqlActionInit_Untyped / CodeqlActionAnalyze_Untyped with typed counterparts and widens the binding version range from [v4.32.4,v5-alpha) to [v4,v5-alpha), matching the now-available typed bindings for all v4 releases.
.github/workflows/release.main.kts Same Codecov untyped → typed migration as branches-and-prs.main.kts; no logic or generated YAML changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Push / PR / MergeGroup] --> B{Workflow Trigger}

    B --> W1[branches-and-prs.yaml]
    B --> W2[codeql-analysis.yaml]
    B --> W3[release.yaml]

    W1 --> C1[check_yaml_consistency]
    C1 --> C2[check_all_workflow_yaml_consistency]
    C2 --> C3[build-and-verify matrix]
    C3 --> C4["CodecovAction\nfailCiIfError = true"]

    W2 --> D1[check_yaml_consistency]
    D1 --> D2[codeql-build matrix]
    D2 --> D3["CodeqlActionInit\n(typed)"]
    D3 --> D4[Build Spock Classes]
    D4 --> D5["CodeqlActionAnalyze\n(typed)"]

    W3 --> E1[check_yaml_consistency]
    E1 --> E2[build-and-verify matrix]
    E2 --> E3["CodecovAction\nfailCiIfError = true"]
    E3 --> E4[release-spock]
    E4 --> E5[publish-release-docs]

    style C4 fill:#90EE90
    style D3 fill:#90EE90
    style D5 fill:#90EE90
    style E3 fill:#90EE90
Loading

Last reviewed commit: 034a49d

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.16%. Comparing base (8d380cc) to head (b7b6d3f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2318   +/-   ##
=========================================
  Coverage     82.16%   82.16%           
  Complexity     4822     4822           
=========================================
  Files           472      472           
  Lines         15036    15036           
  Branches       1905     1905           
=========================================
+ Hits          12354    12355    +1     
  Misses         1989     1989           
+ Partials        693      692    -1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Vampire Vampire force-pushed the vampire/back-to-typesafe branch from 034a49d to 9fdf18b Compare March 19, 2026 16:28
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.main.kts:
- Around line 106-107: Regenerate and commit the generated workflow YAML so it
matches the Kotlin DSL change: update the serialized workflow produced from
release.main.kts (where CodecovAction now uses the typed property failCiIfError
= true) by re-running the generator/build step that emits
.github/workflows/release.yaml, verify the CodecovAction configuration in the
generated release.yaml reflects failCiIfError: true (instead of the old
serialized form), and commit the updated release.yaml alongside the DSL change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: abb327a9-7418-4b72-b127-ea421c0c821a

📥 Commits

Reviewing files that changed from the base of the PR and between 034a49d and 9fdf18b.

📒 Files selected for processing (3)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/codeql-analysis.main.kts
  • .github/workflows/release.main.kts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/branches-and-prs.main.kts

Comment on lines +106 to +107
action = CodecovAction(
failCiIfError = true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Regenerate the workflow YAML to keep source and runtime workflow in sync.

Lines 106-107 migrated to typed failCiIfError = true, but .github/workflows/release.yaml (Lines 43-46) still reflects the old serialized form. Please regenerate and commit the YAML so the executable workflow matches this Kotlin DSL change.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.main.kts around lines 106 - 107, Regenerate and
commit the generated workflow YAML so it matches the Kotlin DSL change: update
the serialized workflow produced from release.main.kts (where CodecovAction now
uses the typed property failCiIfError = true) by re-running the generator/build
step that emits .github/workflows/release.yaml, verify the CodecovAction
configuration in the generated release.yaml reflects failCiIfError: true
(instead of the old serialized form), and commit the updated release.yaml
alongside the DSL change.

@Vampire Vampire force-pushed the vampire/back-to-typesafe branch from 9fdf18b to b7b6d3f Compare March 21, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant